//
//  ConversationManager.h
//  AAIM
//
//  Created by awh on 2019/12/23.
//  Copyright © 2019年 AAIM. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@class BTMessageModel, ConversationListDataBase;

@interface ConversationManager : NSObject
+ (instancetype)shareManager;

// 从数据库重新加载数据
- (void)reloadData;
// 保存会话
- (void)saveConversation:(BTMessageModel *)obj;

// 查找当前登录用户的全部会话
- (NSArray<BTMessageModel *> *)queryAllConversations;

// 查询未读消息数
- (NSInteger)totalUnreadCount;

// 根据时间戳清空该消息的未读消息数
- (void)clearUnreadCount:(BTMessageModel *)msg;

// 删除会话
- (void)deleteConversationWithKeyid:(NSString *)keyid;

@end

NS_ASSUME_NONNULL_END
